<include file="Public/head"/>

<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                     <div class="cf">
                            <form class="form-inline" action="" method="get">
                                <label class="inline">联系方式</label>
                                <input type="text" name="phone" id="phone" value="{:I('phone')}" class="form-control">
                                <label class="inline">状态</label>
                                	<select class="form-control" name='status' id='statu' >
                                		<option value=''>请选择</option>
                                		<option value='2' <if condition="I('statu') eq 2 ">selected="selected"</if>>已回复</option>
                                		<option value='1' <if condition="I('statu') eq 1 ">selected="selected"</if>>未回复</option>   
                                	</select>
                                <button type="button" onclick="sou()" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
                                    搜索
                                </button>
                            </form>
                        </div>
                    <div class="space-4"></div>
                      <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th class='center'>ID</th>
                                <th class='center'>反馈内容</th>
                                <th class='center'>联系方式</th>
                                <th class='center'>反馈时间</th>
                                <th class='center'>状态</th>
                                <th class='center'>回复时间</th>
                                <th class='center'>操作</th>
                            </tr>
                            </thead>
                            <tbody>

                            <?php if($feed_info){
                                foreach($feed_info as $val){ ?>
                                 <tr>

                                     <td class='center'><?php echo $val['id']?></td>
                                     <td width='70%'><?php echo $val['content']?></td>
                                     <td class='center'><?php echo $val['phone']?></td>
                                     <td class='center'>
                                     	<?php if(!empty($val['add_time'])){ ?>
												{$val['add_time']|date="Y-m-d ",###}
										 <?php } ?>

                                     	
                                     </td>
                                     <td class='center'>
                                     		<?php if($val['status'] ==1){ 
												echo '未回复';		
												}elseif($val['status'] ==2){
												echo '已回复';					
												}
                                     		?>
									</td>
                                     <td class='center'>	<?php if(!empty($val['update_time'])){ ?>
                                     	{$val['update_time']|date="Y-m-d ",###}
                                     <?php } ?>
                                     </td>
                                    <td class='center'>
                                    		<?php if($val['status']==1){ ?>
                                         		<a href="<?php echo U('enable',array('id'=>$val['id']));?>"><i
                                              	 class="ace-icon fa fa-pencil bigger-100 red"></i>已回复</a>
                                             <?php } ?>  
                                    </td>

                                </tr>
                            </foreach>
                            <?php }}else{echo "<tr align='center'><td colspan='9'>暂未反馈！</td></tr>";}?>
                            </tbody>
                        </table>
                    {$page}
                    <!-- PAGE CONTENT ENDS -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.page-content -->
    </div>
</div><!-- /.main-content -->
<include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">

    function sou(){
        var phone = $('#phone').val();
        var statu =$('#statu').val();
        var param = '';
        if(phone){
            param += '/phone/'+phone;
        }
        if(statu){
        	param += '/statu/'+statu;
        }
        
        location.href="__APP__/Admin/FeedBack/index"+param+".html";
    }
</script>
</body>
</html>
